--当前血量是否需要触发海格力斯变身

return function(user, maxHp, hp)
    local petIdList = {37};

    -- 获取变身信息
    local shapeIdList = {};
    for _, petId in pairs(petIdList) do
        local userPet = user:getActivePet();
        if userPet.classId == petId then
            shapeIdList = ShapeChangeM.queryShapeIdByClassId(petId);
        end
    end

    -- 根据变身条件完成变身
    for _, shapeId in pairs(shapeIdList) do
        -- 查询变身条件
        local condition = ShapeChangeM.query(shapeId, "condition");
        local hpLower = condition["hp_lower"];

        if hpLower then
            local rate, _ = math.modf(100 * hp / maxHp);
            return rate < hpLower and shapeId or "restore";
        end
    end

    return -1;
end
